home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / PowerPlant / BlueLibrary Pack1 v1.1 / BlueLibrary Pack1 ƒ / BD Common ƒ / CPrefDialog.h < prev    next >
Encoding:
Text File  |  1996-04-22  |  2.3 KB  |  91 lines  |  [TEXT/CWIE]

  1. // ===========================================================================
  2. //    CPrefDialog.h
  3. //    Written by Christophe Causer
  4. //    ©1995 BlueDays Software.  All Rights Reserved.
  5. //
  6. //    You may use this class in any non-commercial program without
  7. //    permission.  The only restriction is that you must credit the
  8. //    author in your about box.  For commercial use, please contact
  9. //    the author at the email address below.
  10. //                    
  11. //    Send bug-reports and comments to bluedays@kagi.com
  12. //    
  13. // ===========================================================================
  14.  
  15. #pragma once
  16.  
  17. #include <LCommander.h>
  18. #include <LListener.h>
  19. #include "CPrefListBox.h"
  20.  
  21. class    LWindow;
  22. class    LTabGroup;
  23.  
  24. // ===========================================================================
  25.  
  26. const MessageT    cmd_EndOfPreferenceDialog    = 'EoPD';
  27.  
  28. // ===========================================================================
  29.  
  30. class CPrefDialog :    public LCommander,
  31.                     public LListener {
  32.  
  33.     public:
  34.  
  35.                         CPrefDialog(    ResIDT        inDialogID,
  36.                                         ResIDT        inItemListID,
  37.                                         LCommander    *inSuper);
  38.         virtual            ~CPrefDialog();
  39.  
  40.         virtual    void    DoDialog();
  41.  
  42.         virtual    Boolean    AllowSubRemoval(LCommander *inSub);
  43.  
  44.         virtual void    FindCommandStatus(CommandT inCommand,
  45.                             Boolean &outEnabled, Boolean &outUsesMark,
  46.                             Char16 &outMark, Str255 outName);
  47.                             
  48.         virtual void    ListenToMessage(MessageT inMessage, void *ioParam);
  49.  
  50.     private:
  51.         void            InitPrefDialog( ResIDT inItemListID);
  52.         void            CreateCell(    sPrefItem    *outCellData,
  53.                                     ResIDT        ICLx_ID,
  54.                                     ResIDT        STRx_ID,
  55.                                     Int16        STRidx_ID,
  56.                                     ResIDT        PPob_ID);
  57.  
  58.         void            ChangePane(    sPrefItem    *inOldCell,
  59.                                     sPrefItem    *inNewCell);
  60.  
  61.     protected:
  62.         LWindow            *mDialog;
  63.         CPrefListBox    *mListBox;
  64.         LView            *mTopPanelView;
  65.         LTabGroup        *mTabGroup;
  66.  
  67.         sPrefItem        mCurrentPrefItem;
  68.         Int32            mCurrentValue;
  69.  
  70.         enum {    panelInit    = 0x001,
  71.                 panelClose    = 0x002,
  72.                 panelShow    = 0x004,
  73.                 panelHide    = 0x005,
  74.                 panelRevert    = 0x006,
  75.                 panelAccept    = 0x007,
  76.                 panelMsg    = 0x008
  77.             };
  78.  
  79.         virtual void    SetUpPanelSelf(    PaneIDT        inPanelID,
  80.                                         MessageT    inMessage,
  81.                                         void*        ioParam    );
  82.  
  83.         virtual    LView*    GetPanel( PaneIDT inPanelID);
  84.  
  85.                 void    DoForEachPanel(    MessageT    inMessage,
  86.                                         void*        ioParam    );
  87.     private:
  88.                 void    SetupPanelsStuff();
  89.                 void    SetupListBoxStuff();
  90.  
  91. };